package com.okex.api.examples;

import static com.okex.api.client.domain.account.NewOrder.limitBuy;
import static com.okex.api.client.domain.account.NewOrder.marketBuy;

import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.List;

import com.okex.api.client.BinanceApiClientFactory;
import com.okex.api.client.BinanceApiRestClient;
import com.okex.api.client.domain.TimeInForce;
import com.okex.api.client.domain.account.NewOrderResponse;
import com.okex.api.client.domain.account.Order;
import com.okex.api.client.domain.account.request.AllOrdersRequest;
import com.okex.api.client.domain.account.request.CancelOrderRequest;
import com.okex.api.client.domain.account.request.OrderRequest;
import com.okex.api.client.domain.account.request.OrderStatusRequest;
import com.okex.api.client.exception.BinanceApiException;

/**
 * Examples on how to place orders, cancel them, and query account information.
 */
public class MyOrdersExample {
	//apiKey=510a8b6b-845f-4f3d-b2c0-4e411cb0502c
	//secretKey=9B16ABAAAA5F31B6655212B6EE69020D
	public static final String YOUR_API_KEY = "510a8b6b-845f-4f3d-b2c0-4e411cb0502c";
	public static final String YOUR_SECRET = "9B16ABAAAA5F31B6655212B6EE69020D";
	
	public static void main(String[] args) {
		try {
			System.out.println(InetAddress.getLocalHost().getHostAddress());
		} catch (UnknownHostException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		BinanceApiClientFactory factory = BinanceApiClientFactory.newInstance(YOUR_API_KEY, YOUR_SECRET);
		BinanceApiRestClient client = factory.newRestClient();
		System.out.println(client.getTicker("ltc_btc").toString());

	}

}
